﻿<Page
    x:Class="WellDone.EmployeeChecksDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:WellDone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Page.Resources>
        <Style x:Key="ListViewItemStyleOpenRPOS" TargetType="ListViewItem">
            <!--            
            <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
-->
            <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="TabNavigation" Value="Local"/>
            <Setter Property="IsHoldingEnabled" Value="True"/>
            <Setter Property="Margin" Value="0,0,18,2"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListViewItem">
                        <ListViewItemPresenter SelectedBorderThickness="0" CheckHintBrush="{ThemeResource ListViewItemCheckHintThemeBrush}" CheckBrush="{ThemeResource ListViewItemCheckThemeBrush}" ContentMargin="3" ContentTransitions="{TemplateBinding ContentTransitions}" CheckSelectingBrush="{ThemeResource ListViewItemCheckSelectingThemeBrush}" DragForeground="{ThemeResource ListViewItemDragForegroundThemeBrush}" DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}" DragBackground="{ThemeResource ListViewItemDragBackgroundThemeBrush}" DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}" FocusBorderBrush="{ThemeResource ListViewItemFocusBorderThemeBrush}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" PointerOverBackgroundMargin="1" PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackgroundThemeBrush}" PointerOverBackground="{ThemeResource ListViewItemPointerOverBackgroundThemeBrush}" ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}" SelectedPointerOverBorderBrush="{ThemeResource ListViewItemSelectedPointerOverBorderThemeBrush}" SelectionCheckMarkVisualEnabled="False" SelectedForeground="{ThemeResource ListViewItemSelectedForegroundThemeBrush}" SelectedPointerOverBackground="{ThemeResource ListViewItemSelectedPointerOverBackgroundThemeBrush}" SelectedBackground="{ThemeResource ListViewItemSelectedBackgroundThemeBrush}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Page.Resources>

    <Grid
        x:Name="RootPanel"
        Background="#FF98DEF8"
        Opacity=".75"
        HorizontalAlignment="Stretch"
        VerticalAlignment="Stretch">

        <Grid x:Name="LayoutRoot" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Width="950" Margin="50,10" >
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <TextBlock HorizontalAlignment="Center" Margin="0,10" FontSize="30" TextWrapping="Wrap" Text="Employee Checks" VerticalAlignment="Top"/>
            <TextBlock HorizontalAlignment="Left" Margin="20,50,0,0" Grid.Row="0" FontSize="30" TextWrapping="Wrap" Text="Employee Name" VerticalAlignment="Top"/>
            <ComboBox x:Name="cmbEmployees" HorizontalAlignment="Left" Margin="15,90,0,0" VerticalAlignment="Top" Width="334" SelectionChanged="cmbEmployees_SelectionChanged" >
                <ComboBox.RenderTransform>
                    <CompositeTransform ScaleX="2" ScaleY="2"/>
                </ComboBox.RenderTransform>
            </ComboBox>
            <TextBlock HorizontalAlignment="Left" Margin="20,170,0,0" Grid.Row="0" FontSize="30" TextWrapping="Wrap" Text="Order #" VerticalAlignment="Top"/>
            <TextBlock HorizontalAlignment="Left" Margin="140,170,0,0" Grid.Row="0" FontSize="30" TextWrapping="Wrap" Text="Table" VerticalAlignment="Top"/>
            <TextBlock HorizontalAlignment="Left" Margin="230,170,0,0" Grid.Row="0" FontSize="30" TextWrapping="Wrap" Text="Time" VerticalAlignment="Top"/>
            <TextBlock HorizontalAlignment="Left" Margin="340,170,0,0" Grid.Row="0" FontSize="30" TextWrapping="Wrap" Text="Check #" VerticalAlignment="Top"/>
            <TextBlock HorizontalAlignment="Left" Margin="495,170,0,0" Grid.Row="0" FontSize="30" TextWrapping="Wrap" Text="Payment" VerticalAlignment="Top"/>
            <TextBlock HorizontalAlignment="Left" Margin="620,170,0,0" Grid.Row="0" FontSize="30" TextWrapping="Wrap" Text="Subtotal" VerticalAlignment="Top"/>
            <TextBlock HorizontalAlignment="Left" Margin="760,170,0,0" Grid.Row="0" FontSize="30" TextWrapping="Wrap" Text="Tax" VerticalAlignment="Top"/>
            <TextBlock HorizontalAlignment="Left" Margin="840,170,0,0" Grid.Row="0" FontSize="30" TextWrapping="Wrap" Text="Total" VerticalAlignment="Top"/>
            <ListView HorizontalAlignment="Left" Margin="10,210,10,10" Width="930" Grid.Row="0" VerticalAlignment="Top" x:Name="lvCurrentEmployeeChecks" Background="White" SelectionMode="Multiple" ItemContainerStyle="{StaticResource ListViewItemStyleOpenRPOS}" IsSwipeEnabled="False" SelectionChanged="lvCurrentEmployeeChecks_SelectionChanged" >
                <ListView.ItemContainerTransitions>
                    <TransitionCollection/>
                </ListView.ItemContainerTransitions>
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100" />
                                <ColumnDefinition Width="80" />
                                <ColumnDefinition Width="120" />
                                <ColumnDefinition Width="100" />
                                <ColumnDefinition Width="200" />
                                <ColumnDefinition Width="115" />
                                <ColumnDefinition Width="80" />
                                <ColumnDefinition Width="90" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Foreground="{Binding FontColor}" Grid.Column="0" Text="{Binding OrderSummaryID}" FontSize="28" Margin="5,0,0,0" />
                            <TextBlock Foreground="{Binding FontColor}" Grid.Column="1" Text="{Binding Table}" FontSize="28" HorizontalAlignment="Center" />
                            <TextBlock Foreground="{Binding FontColor}" Grid.Column="2" Text="{Binding Time}" FontSize="28" HorizontalAlignment="Right" />
                            <TextBlock Foreground="{Binding FontColor}" Grid.Column="3" Text="{Binding OrderCheckID}" FontSize="28" HorizontalAlignment="Right" />
                            <TextBlock Foreground="{Binding FontColor}" Grid.Column="4" Text="{Binding Payment}" FontSize="28" Margin="5,0,0,0" HorizontalAlignment="Right" />
                            <TextBlock Foreground="{Binding FontColor}" Grid.Column="5" Text="{Binding Subtotal}" FontSize="28" HorizontalAlignment="Right" />
                            <TextBlock Foreground="{Binding FontColor}" Grid.Column="6" Text="{Binding Tax}" FontSize="28" Margin="5,0,0,0"  HorizontalAlignment="Right" />
                            <TextBlock Foreground="{Binding FontColor}" Grid.Column="7" Text="{Binding Total}" FontSize="28" HorizontalAlignment="Right"/>
                        </Grid>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
            <Button x:Name="btnReprintCheck" Margin="10,10" Width="120" Height="85" FontSize="28" HorizontalAlignment="Left" Grid.Row="1" IsEnabled="False" Click="btnReprintCheck_Click" >
                <TextBlock TextWrapping="WrapWholeWords" TextAlignment="Center" FontSize="25">Reprint Check</TextBlock>
            </Button>
            <Button x:Name="btnPrintSales" Margin="0,10" Width="120" Height="85" FontSize="28" HorizontalAlignment="Center" Grid.Row="1" Click="btnPrintSales_Click" >
                <TextBlock TextWrapping="WrapWholeWords" TextAlignment="Center" FontSize="18">Print Sales Report</TextBlock>
            </Button>
            <Button x:Name="btnClose" Margin="10,10" Content="Close" Width="120" Height="85" FontSize="28" HorizontalAlignment="Right" Grid.Row="1" Click="btnClose_Click" />
        </Grid>
    </Grid>
</Page>
